<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>信息管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#btnImport").click(function(){
				$.jBox($("#importBox").html(), {title:"导入信息登记", buttons:{"关闭":true}, 
					bottomText:"导入文件不能超过5M，仅允许导入“doc文件”！"});
			});
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
		
		function yanqi(id){
			$("#id").val(id);
			$('#demoModal').modal('show');
		}
		
		function shangchuan(){
			var id=$("#id").val();
			var time=$("#time").val();
			var yuan=$("#yuan").val();
			if(time!=null&&time!=''){
				if(!isNaN(time)){
					$("#formdatayan").submit();
				
				}else{
					alert("只可以输入数字");
				}
			}else{
				alert("延期天数不可为空");
			}
		}
		function quxiao(){
			$('#demoModal').modal('hide');
		}
		/* function chu(id){
			$("#chuid").val(id);
			$('#chuModal').modal('show');
		} */
	</script>
</head>
<body>

	<ul class="nav nav-tabs">
		<%-- <shiro:hasPermission name="numberinfo:yhcgNumberinfo:edit"><li><a href="${ctx}/numberinfo/yhcgNumberinfo/form">信息登记</a></li></shiro:hasPermission> --%>
		<li class="active"><a href="${ctx}/numberinfo/yhcgNumberinfo/listcheng">调处整治</a></li>
	</ul>
	<form:form id="searchForm" modelAttribute="yhcgNumberinfo" action="${ctx}/numberinfo/yhcgNumberinfo/listcheng" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>编号：</label>
				<form:input path="number" htmlEscape="false" maxlength="255" class="input-medium"/>
			</li>
			<li><label>来源：</label>
				<form:select path="come" class="input-medium required"   type="select[disabled]">
					<form:option value="">请选择</form:option>
					<form:options items="${fns:getDictList('come_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</li>
			<li>
			<label>事件类别:</label>
			<form:select path="type" class="input-medium required">
					<form:option value="">请选择</form:option>
					<form:options items="${fns:getDictList('type_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</li>
			<li>
			<label>逾期:</label>
			<form:select  path="timestatus" class="input-medium" >
					<form:option value="">请选择</form:option>
					<form:option value="1">已逾期</form:option>
					<form:option value="2">即将逾期</form:option>
				</form:select>
			</li>
			<%-- <li>
			<label>责任单位</label>
			<form:select  path="responsibilityunit" class="input-medium" >
				
					<form:options items="${list}" itemLabel="name" itemValue="id" htmlEscape="false"/>
					<form:option value="">请选择</form:option>
				</form:select>
			</li>
			<li>
			<label>督办单位</label>
			<form:select  path="supervisionunit" class="input-medium" >
				
					<form:options items="${list1}" itemLabel="name" itemValue="id" htmlEscape="false"/>
					<form:option value="">请选择</form:option>
				</form:select>
			</li> --%>
			<li><label>关键字：</label>
				<form:input path="content" htmlEscape="false" class="input-medium"/>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
			</li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>登记编号</th>
				<th>来源</th>
				<th>事件类别</th>
				<th>转办时间</th>
				<th>还剩天数</th>
				<th>主要内容</th>
				<th>责任单位</th>
				<th>督办单位</th>
				<th>延期申请</th>
				<th>任务处置</th>
				<th>查看</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="yhcgNumberinfo">
			<tr>
				<td>
					${yhcgNumberinfo.number}
				</td>
				<td>
					${fns:getDictLabel(yhcgNumberinfo.come, 'come_type', '')}
				</td>
				<td>
					${fns:getDictLabel(yhcgNumberinfo.type, 'type_type', '')}
				</td>
				<td>
				<fmt:formatDate value="${yhcgNumberinfo.createtime}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
				<td>
				${fns:DateList(yhcgNumberinfo.timelimit, '')}
				</td>
				<td>
				<span title="${yhcgNumberinfo.content}" >${fn:substring(yhcgNumberinfo.content, 0, 10)}</span>	
				</td>
				<td>
					${yhcgNumberinfo.zenname}
				</td>
				<td>
					${yhcgNumberinfo.duname}
				</td>
				<td>
				<a onclick="yanqi('${yhcgNumberinfo.id}')"  style="cursor:pointer;">申请</a>
				</td>
				<td>
				 <a href="${ctx}/numberinfo/yhcgNumberinfo/formdatarenchu?id=${yhcgNumberinfo.id}">任务处置</a>
				</td>
				<td>
				<a href="${ctx}/numberinfo/yhcgNumberinfo/numberchakan?id=${yhcgNumberinfo.id}">查看</a>
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
	<div class="modal fade" id="demoModal" class="hide" style="top:200px;width: 300px">
        <div class="modal-dialog" >
             <div class="modal-content">
                 <div class="modal-header">
                      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                      <h4 class="modal-title" id="demoModalLabel">延期申请</h4>
                 </div>
                 <div class="modal-body" style="height: 150px;">
                 <form id="formdatayan" action="${ctx}/numberinfo/yhcgNumberinfo/formdatayan" method="post" >
                 	<input type="hidden" id="id" name="id">
			        <input type="text" name="time" id="time" placeholder="请输入延期天数，此天数为工作日">
			        <textarea  id="yuan" name="yuan" placeholder="请输入延期原因"></textarea>
                 <button type="button" class="btn   btn-primary" data-dismiss="modal" onclick="shangchuan()" >提交</button>
        		 <button type="button" class="btn btn-default" data-dismiss="modal" onclick="quxiao()" >取消</button>
                     </form>
                     </div>
             </div>
         </div>
    </div>
    
</body>
</html>